﻿using System.Windows.Input;
using TestBat.IViewModels.Dialogs;
using TestBat.ViewModels.Base.Commands;

namespace TestBat.ViewModels.Dialogs
{
    public class YesNoDialogViewModel : DialogViewModel, IYesNoDialogViewModel
    {
        public YesNoDialogViewModel(string question, ICommand yesCommand, ICommand noCommand)
        {
            this.YesCommand = new JoinedCommand(yesCommand, new RelayCommand(e => InvokeCloseEvent()));
            this.NoCommand = new JoinedCommand(noCommand, new RelayCommand(e => InvokeCloseEvent()));
            this.Question = question;
        }

        public string Question
        {
            get;
            private set;
        }

        public override ICommand CloseCommand
        {
            get { return NoCommand; }
        }

        public ICommand YesCommand
        {
            get;
            private set;
        }

        public ICommand NoCommand
        {
            get;
            private set;
        }
    }
}
